
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>docker安装_centOS方式 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="docker升级_centOS方式.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../SUMMARY.html">
            
                <a href="../SUMMARY.html">
            
                    
                    工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="SUMMARY.html">
            
                <a href="SUMMARY.html">
            
                    
                    docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="./">
            
                <a href="./">
            
                    
                    docker简介
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.1.2" data-path="docker安装_centOS方式.html">
            
                <a href="docker安装_centOS方式.html">
            
                    
                    docker安装_centOS方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="docker升级_centOS方式.html">
            
                <a href="docker升级_centOS方式.html">
            
                    
                    docker升级_centOS方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="docker卸载.html">
            
                <a href="docker卸载.html">
            
                    
                    docker卸载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="docker配置.html">
            
                <a href="docker配置.html">
            
                    
                    docker配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6" data-path="docker常用命令.html">
            
                <a href="docker常用命令.html">
            
                    
                    docker常用命令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >docker安装_centOS方式</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
                                <section class="normal markdown-section">
                                
                                <h1 id="docker&#x5B89;&#x88C5;centos&#x65B9;&#x5F0F;">docker&#x5B89;&#x88C5;_centOS&#x65B9;&#x5F0F;</h1>
<p>==<a href="https://docs.docker.com/install/linux/docker-ce/centos" target="_blank">&#x57FA;&#x4E8E;&#x5B98;&#x65B9;&#x6587;&#x6863;</a>==</p>
<p>docker &#x63A8;&#x8350;&#x4F7F;&#x7528;3&#x79CD;</p>
<ol>
<li>&#x4F7F;&#x7528;docker&#x7684;&#x50A8;&#x5B58;&#x5E93;&#x7BA1;&#x7406; -&gt; &#x5B98;&#x65B9;&#x63A8;&#x8350;</li>
<li>&#x4F7F;&#x7528;&#x4E0B;&#x8F7D;&#x7684;rpm&#x5305;&#x5B89;&#x88C5;&#x7BA1;&#x7406;</li>
<li><p>&#x4F7F;&#x7528;&#x81EA;&#x52A8;&#x5316;&#x811A;&#x672C;&#x5B89;&#x88C5;</p>
<p><br></p>
</li>
</ol>
<p><strong>&#x8FD9;&#x91CC;&#x4F7F;&#x7528;rpm&#x5305;&#x65B9;&#x5F0F;</strong></p>
<ol>
<li><p><strong>&#x5220;&#x9664;&#x65E7;&#x7248;&#x672C;&#x6216;&#x8005;&#x81EA;&#x5E26;&#x7248;&#x672C;</strong></p>
<pre><code class="lang-shell"> sudo yum remove docker \
  docker-client \
  docker-client-latest \
  docker-common \
  docker-latest \
  docker-latest-logrotate \
  docker-logrotate \
  docker-engine
</code></pre>
<p> <br></p>
</li>
<li><p><strong>&#x4E0B;&#x8F7D;&#x7A33;&#x5B9A;&#x7248;&#x672C;</strong>
 &#x5230;<a href="https://download.docker.com/linux/centos/7/x86_64/stable/Packages/" target="_blank">&#x5B98;&#x7F51;</a>&#x9009;&#x62E9;&#x7248;&#x672C; </p>
<blockquote>
<p>  &#x8FD9;&#x91CC;&#x7528;docker-ce-18.09.3-3.el7.x86_64.rpm</p>
</blockquote>
<pre><code class="lang-shell"> yum install (rpm&#x5168;&#x8DEF;&#x5F84;)  # &#x8FD9;&#x65F6;&#x4F1A;&#x62A5;&#x9519;
</code></pre>
<p> <br></p>
</li>
<li><p><strong>&#x4E0B;&#x8F7D;&#x524D;&#x7F6E;</strong></p>
<p>  &#x540C;&#x4E00;&#x4E2A;<a href="https://download.docker.com/linux/centos/7/x86_64/stable/Packages/" target="_blank">&#x4E0B;&#x8F7D;&#x5730;&#x5740;</a> </p>
<blockquote>
<p>  containerd.io-1.2.2-3.el7.x86_64.rpm</p>
<p>  docker-ce-cli-18.09.3-3.el7.x86_64.rpm</p>
</blockquote>
<p>  &#x6700;&#x597D;&#x662F;&#x6839;&#x636E;&#x7B2C;&#x4E8C;&#x6B65;&#x7684;&#x62A5;&#x9519;&#x4FE1;&#x606F;&#x6765;&#x51B3;&#x5B9A;&#x4E0B;&#x4EC0;&#x4E48;,&#x4EC0;&#x4E48;&#x7248;&#x672C; &#x5F53;&#x65F6;&#x6700;&#x65B0;&#x7684;&#x9700;&#x8981;&#x8FD9;2&#x4E2A;  </p>
<p>  &#x6BD4;&#x8F83;&#x65E7;&#x7684;&#x4F1A;&#x9700;&#x8981;docker-ce-selinux</p>
<p>  <br></p>
</li>
<li><p><strong>&#x5B89;&#x88C5;&#x524D;&#x7F6E;&#x548C;docker</strong></p>
<pre><code class="lang-shell"> yum install (docker rpm&#x5168;&#x8DEF;&#x5F84;)
 yum install (io &#x548C;cli &#x7684;rpm&#x5168;&#x8DEF;&#x5F84;)
</code></pre>
<p> <br></p>
</li>
<li><p><strong>&#x542F;&#x52A8;docker</strong></p>
<pre><code class="lang-shell"> sudo systemctl start docker
</code></pre>
<p> <br></p>
</li>
<li><p><strong>&#x8FD0;&#x884C;&#x6D4B;&#x8BD5;</strong></p>
<pre><code class="lang-shell"> sudo docker run hello-world
</code></pre>
<p> &#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x5C06;&#x4E0B;&#x8F7D;&#x4E00;&#x4E2A;&#x6D4B;&#x8BD5;image &#x548C;&#x5BB9;&#x5668;
 &#x5F53;&#x5BB9;&#x5668;&#x8FD0;&#x884C;&#x65F6;&#x4F1A;&#x6253;&#x5370;&#x4E00;&#x4E9B;&#x6D88;&#x606F;&#x7136;&#x540E;&#x9000;&#x51FA;</p>
</li>
</ol>

                                
                                </section>
                            
                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: docker简介">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="docker升级_centOS方式.html" class="navigation navigation-next " aria-label="Next page: docker升级_centOS方式">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"docker安装_centOS方式","level":"1.2.1.2","depth":3,"next":{"title":"docker升级_centOS方式","level":"1.2.1.3","depth":3,"path":"工具/docker/docker升级_centOS方式.md","ref":"工具/docker/docker升级_centOS方式.md","articles":[]},"previous":{"title":"docker简介","level":"1.2.1.1","depth":3,"path":"工具/docker/README.md","ref":"工具/docker/README.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["expandable-chapters-small","livereload"],"pluginsConfig":{"expandable-chapters-small":{},"livereload":{},"highlight":{},"search":{"maxIndexSize":1000000},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"工具/docker/docker安装_centOS方式.md","mtime":"2019-03-19T14:00:50.816Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-03-19T13:58:49.999Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/buttons.js"></script>
        
    

    </body>
</html>

